<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DataKinds #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE GADTs #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-8"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Cmm.Dataflow.Graph</span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Body"><span class="hs-identifier">Body</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph"><span class="hs-identifier">Graph</span></a></span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier">Graph'</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-12"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#NonLocal"><span class="hs-identifier">NonLocal</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-13"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#addBlock"><span class="hs-identifier">addBlock</span></a></span><span>
</span><span id="line-14"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#bodyList"><span class="hs-identifier">bodyList</span></a></span><span>
</span><span id="line-15"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#emptyBody"><span class="hs-identifier">emptyBody</span></a></span><span>
</span><span id="line-16"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#labelsDefined"><span class="hs-identifier">labelsDefined</span></a></span><span>
</span><span id="line-17"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#mapGraph"><span class="hs-identifier">mapGraph</span></a></span><span>
</span><span id="line-18"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#mapGraphBlocks"><span class="hs-identifier">mapGraphBlocks</span></a></span><span>
</span><span id="line-19"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#revPostorderFrom"><span class="hs-identifier">revPostorderFrom</span></a></span><span>
</span><span id="line-20"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Label</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Block</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Collections</span></a></span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Kind.html#"><span class="hs-identifier">Data.Kind</span></a></span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-comment">-- | A (possibly empty) collection of closed/closed blocks</span><span>
</span><span id="line-33"></span><span class="hs-keyword">type</span><span> </span><span id="Body"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Body"><span class="hs-identifier hs-var">Body</span></a></span></span><span> </span><span id="local-6989586621680941053"><span class="annot"><a href="#local-6989586621680941053"><span class="hs-identifier hs-type">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Block"><span class="hs-identifier hs-type">Block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941053"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-comment">-- | @Body@ abstracted over @block@</span><span>
</span><span id="line-36"></span><span class="hs-keyword">type</span><span> </span><span id="Body%27"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Body%27"><span class="hs-identifier hs-var">Body'</span></a></span></span><span> </span><span id="local-6989586621680941052"><span class="annot"><a href="#local-6989586621680941052"><span class="hs-identifier hs-type">block</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680941051"><span class="annot"><a href="#local-6989586621680941051"><span class="hs-identifier hs-type">n</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Extensibility"><span class="hs-identifier hs-type">Extensibility</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Extensibility"><span class="hs-identifier hs-type">Extensibility</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Type</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941052"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941051"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-comment">-------------------------------</span><span>
</span><span id="line-39"></span><span class="hs-comment">-- | Gives access to the anchor points for</span><span>
</span><span id="line-40"></span><span class="hs-comment">-- nonlocal edges as well as the edges themselves</span><span>
</span><span id="line-41"></span><span class="hs-keyword">class</span><span> </span><span id="NonLocal"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#NonLocal"><span class="hs-identifier hs-var">NonLocal</span></a></span></span><span> </span><span id="local-6989586621680941167"><span class="annot"><a href="#local-6989586621680941167"><span class="hs-identifier hs-type">thing</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-42"></span><span>  </span><span id="local-6989586621680941172"><span id="entryLabel"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-type">entryLabel</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680941167"><span class="hs-identifier hs-type">thing</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941172"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span></span><span>   </span><span class="hs-comment">-- ^ The label of a first node or block</span><span>
</span><span id="line-43"></span><span>  </span><span id="local-6989586621680941169"><span id="successors"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-type">successors</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680941167"><span class="hs-identifier hs-type">thing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941169"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">]</span></span><span> </span><span class="hs-comment">-- ^ Gives control-flow successors</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span id="local-6989586621680941166"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#NonLocal"><span class="hs-identifier hs-type">NonLocal</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941166"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#NonLocal"><span class="hs-identifier hs-type">NonLocal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Block"><span class="hs-identifier hs-type">Block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941166"><span class="hs-identifier hs-type">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>  </span><span id="local-6989586621680941043"><span class="annot"><span class="annottext">entryLabel :: forall (x :: Extensibility). Block n C x -&gt; Label
</span><a href="#local-6989586621680941043"><span class="hs-identifier hs-var hs-var hs-var hs-var">entryLabel</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#BlockCO"><span class="hs-identifier hs-type">BlockCO</span></a></span><span> </span><span id="local-6989586621680941038"><span class="annot"><span class="annottext">n C 'Open
</span><a href="#local-6989586621680941038"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">Block n 'Open 'Open
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">n C 'Open -&gt; Label
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
NonLocal thing =&gt;
thing C x -&gt; Label
</span><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var">entryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">n C 'Open
</span><a href="#local-6989586621680941038"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-47"></span><span>  </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var">entryLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#BlockCC"><span class="hs-identifier hs-type">BlockCC</span></a></span><span> </span><span id="local-6989586621680941033"><span class="annot"><span class="annottext">n C 'Open
</span><a href="#local-6989586621680941033"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">Block n 'Open 'Open
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">n 'Open C
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">n C 'Open -&gt; Label
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
NonLocal thing =&gt;
thing C x -&gt; Label
</span><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var">entryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">n C 'Open
</span><a href="#local-6989586621680941033"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span>  </span><span id="local-6989586621680941032"><span class="annot"><span class="annottext">successors :: forall (e :: Extensibility). Block n e C -&gt; [Label]
</span><a href="#local-6989586621680941032"><span class="hs-identifier hs-var hs-var hs-var hs-var">successors</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#BlockOC"><span class="hs-identifier hs-type">BlockOC</span></a></span><span>   </span><span class="annot"><span class="annottext">Block n 'Open 'Open
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680941027"><span class="annot"><span class="annottext">n 'Open C
</span><a href="#local-6989586621680941027"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">n 'Open C -&gt; [Label]
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (e :: Extensibility).
NonLocal thing =&gt;
thing e C -&gt; [Label]
</span><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="annot"><span class="annottext">n 'Open C
</span><a href="#local-6989586621680941027"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-50"></span><span>  </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#BlockCC"><span class="hs-identifier hs-type">BlockCC</span></a></span><span> </span><span class="annot"><span class="annottext">n C 'Open
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Block n 'Open 'Open
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680941023"><span class="annot"><span class="annottext">n 'Open C
</span><a href="#local-6989586621680941023"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">n 'Open C -&gt; [Label]
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (e :: Extensibility).
NonLocal thing =&gt;
thing e C -&gt; [Label]
</span><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="annot"><span class="annottext">n 'Open C
</span><a href="#local-6989586621680941023"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span id="local-6989586621680941161"><span id="local-6989586621680941162"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#emptyBody"><span class="hs-identifier hs-type">emptyBody</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Body%27"><span class="hs-identifier hs-type">Body'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941162"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941161"><span class="hs-identifier hs-type">n</span></a></span></span></span><span>
</span><span id="line-54"></span><span id="emptyBody"><span class="annot"><span class="annottext">emptyBody :: forall (block :: (Extensibility -&gt; Extensibility -&gt; *)
                 -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n :: Extensibility -&gt; Extensibility -&gt; *).
Body' block n
</span><a href="GHC.Cmm.Dataflow.Graph.html#emptyBody"><span class="hs-identifier hs-var hs-var">emptyBody</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelMap (block n C C)
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span id="local-6989586621680941152"><span id="local-6989586621680941153"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#bodyList"><span class="hs-identifier hs-type">bodyList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Body%27"><span class="hs-identifier hs-type">Body'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941153"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941152"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621680941153"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941152"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span></span></span><span>
</span><span id="line-57"></span><span id="bodyList"><span class="annot"><span class="annottext">bodyList :: forall (block :: (Extensibility -&gt; Extensibility -&gt; *)
                 -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n :: Extensibility -&gt; Extensibility -&gt; *).
Body' block n -&gt; [(Label, block n C C)]
</span><a href="GHC.Cmm.Dataflow.Graph.html#bodyList"><span class="hs-identifier hs-var hs-var">bodyList</span></a></span></span><span> </span><span id="local-6989586621680941018"><span class="annot"><span class="annottext">Body' block n
</span><a href="#local-6989586621680941018"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Body' block n -&gt; [(KeyOf LabelMap, block n C C)]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a -&gt; [(KeyOf map, a)]
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapToList"><span class="hs-identifier hs-var">mapToList</span></a></span><span> </span><span class="annot"><span class="annottext">Body' block n
</span><a href="#local-6989586621680941018"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span id="local-6989586621680941147"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#addBlock"><span class="hs-identifier hs-type">addBlock</span></a></span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#NonLocal"><span class="hs-identifier hs-type">NonLocal</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941147"><span class="hs-identifier hs-type">block</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#HasDebugCallStack"><span class="hs-identifier hs-type">HasDebugCallStack</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680941147"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941147"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941147"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-62"></span><span id="addBlock"><span class="annot"><span class="annottext">addBlock :: forall (block :: Extensibility -&gt; Extensibility -&gt; *).
(NonLocal block, HasDebugCallStack) =&gt;
block C C -&gt; LabelMap (block C C) -&gt; LabelMap (block C C)
</span><a href="GHC.Cmm.Dataflow.Graph.html#addBlock"><span class="hs-identifier hs-var hs-var">addBlock</span></a></span></span><span> </span><span id="local-6989586621680941008"><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680941008"><span class="hs-identifier hs-var">block</span></a></span></span><span> </span><span id="local-6989586621680941007"><span class="annot"><span class="annottext">LabelMap (block C C)
</span><a href="#local-6989586621680941007"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Maybe (block C C) -&gt; Maybe (block C C))
-&gt; KeyOf LabelMap -&gt; LabelMap (block C C) -&gt; LabelMap (block C C)
forall (map :: * -&gt; *) a.
IsMap map =&gt;
(Maybe a -&gt; Maybe a) -&gt; KeyOf map -&gt; map a -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapAlter"><span class="hs-identifier hs-var">mapAlter</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (block C C) -&gt; Maybe (block C C)
</span><a href="#local-6989586621680941005"><span class="hs-identifier hs-var">add</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
Label
</span><a href="#local-6989586621680941004"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap (block C C)
</span><a href="#local-6989586621680941007"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-63"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-64"></span><span>    </span><span id="local-6989586621680941004"><span class="annot"><span class="annottext">lbl :: Label
</span><a href="#local-6989586621680941004"><span class="hs-identifier hs-var hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">block C C -&gt; Label
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
NonLocal thing =&gt;
thing C x -&gt; Label
</span><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var">entryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680941008"><span class="hs-identifier hs-var">block</span></a></span><span>
</span><span id="line-65"></span><span>    </span><span id="local-6989586621680941005"><span class="annot"><span class="annottext">add :: Maybe (block C C) -&gt; Maybe (block C C)
</span><a href="#local-6989586621680941005"><span class="hs-identifier hs-var hs-var">add</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe (block C C)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">block C C -&gt; Maybe (block C C)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680941008"><span class="hs-identifier hs-var">block</span></a></span><span>
</span><span id="line-66"></span><span>    </span><span class="annot"><a href="#local-6989586621680941005"><span class="hs-identifier hs-var">add</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (block C C)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; Maybe (block C C)
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; Maybe (block C C)) -&gt; [Char] -&gt; Maybe (block C C)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;duplicate label &quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680941004"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot; in graph&quot;</span></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-70"></span><span class="hs-comment">-- Graph</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-comment">-- | A control-flow graph, which may take any of four shapes (O/O,</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- O/C, C/O, C/C).  A graph open at the entry has a single,</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- distinguished, anonymous entry point; if a graph is closed at the</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- entry, its entry point(s) are supplied by a context.</span><span>
</span><span id="line-76"></span><span class="hs-keyword">type</span><span> </span><span id="Graph"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph"><span class="hs-identifier hs-var">Graph</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Block"><span class="hs-identifier hs-type">Block</span></a></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span class="hs-comment">-- | @Graph'@ is abstracted over the block type, so that we can build</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- graphs of annotated blocks for example (Compiler.Hoopl.Dataflow</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- needs this).</span><span>
</span><span id="line-81"></span><span class="hs-keyword">data</span><span> </span><span id="Graph%27"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-var">Graph'</span></a></span></span><span> </span><span id="local-6989586621680941001"><span class="annot"><a href="#local-6989586621680941001"><span class="hs-identifier hs-type">block</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680941000"><span class="annot"><a href="#local-6989586621680941000"><span class="hs-identifier hs-type">n</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Extensibility"><span class="hs-identifier hs-type">Extensibility</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Extensibility"><span class="hs-identifier hs-type">Extensibility</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Type</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680940999"><span class="annot"><a href="#local-6989586621680940999"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span id="local-6989586621680940998"><span class="annot"><a href="#local-6989586621680940998"><span class="hs-identifier hs-type">x</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-82"></span><span>  </span><span id="local-6989586621680941097"><span id="local-6989586621680941098"><span id="GNil"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#GNil"><span class="hs-identifier hs-var">GNil</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941098"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941097"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span></span></span><span>
</span><span id="line-83"></span><span>  </span><span id="local-6989586621680941095"><span id="local-6989586621680941096"><span id="GUnit"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#GUnit"><span class="hs-identifier hs-var">GUnit</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680941096"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941095"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941096"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941095"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span></span></span><span>
</span><span id="line-84"></span><span>  </span><span id="local-6989586621680941091"><span id="local-6989586621680941092"><span id="local-6989586621680941093"><span id="local-6989586621680941094"><span id="GMany"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#GMany"><span class="hs-identifier hs-var">GMany</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#MaybeO"><span class="hs-identifier hs-type">MaybeO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941094"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941093"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941092"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Body%27"><span class="hs-identifier hs-type">Body'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941093"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941092"><span class="hs-identifier hs-type">n</span></a></span><span>
</span><span id="line-86"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#MaybeO"><span class="hs-identifier hs-type">MaybeO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941091"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941093"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941092"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-87"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941093"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941092"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941094"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941091"><span class="hs-identifier hs-type">x</span></a></span></span></span></span></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- Mapping over graphs</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-comment">-- | Maps over all nodes in a graph.</span><span>
</span><span id="line-94"></span><span id="local-6989586621680941129"><span id="local-6989586621680941130"><span id="local-6989586621680941131"><span id="local-6989586621680941134"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#mapGraph"><span class="hs-identifier hs-type">mapGraph</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680941133"><span class="annot"><a href="#local-6989586621680941133"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span id="local-6989586621680941132"><span class="annot"><a href="#local-6989586621680941132"><span class="hs-identifier hs-type">x</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="#local-6989586621680941134"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941133"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941132"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680941131"><span class="hs-identifier hs-type">n'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941133"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941132"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph"><span class="hs-identifier hs-type">Graph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941134"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941130"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941129"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph"><span class="hs-identifier hs-type">Graph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941131"><span class="hs-identifier hs-type">n'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941130"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941129"><span class="hs-identifier hs-type">x</span></a></span></span></span></span></span><span>
</span><span id="line-95"></span><span id="mapGraph"><span class="annot"><span class="annottext">mapGraph :: forall (n :: Extensibility -&gt; Extensibility -&gt; *)
       (n' :: Extensibility -&gt; Extensibility -&gt; *) (e :: Extensibility)
       (x :: Extensibility).
(forall (e :: Extensibility) (x :: Extensibility). n e x -&gt; n' e x)
-&gt; Graph n e x -&gt; Graph n' e x
</span><a href="GHC.Cmm.Dataflow.Graph.html#mapGraph"><span class="hs-identifier hs-var hs-var">mapGraph</span></a></span></span><span> </span><span id="local-6989586621680940993"><span class="annot"><span class="annottext">forall (e :: Extensibility) (x :: Extensibility). n e x -&gt; n' e x
</span><a href="#local-6989586621680940993"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall (e :: Extensibility) (x :: Extensibility).
 Block n e x -&gt; Block n' e x)
-&gt; Graph' Block n e x -&gt; Graph' Block n' e x
forall (block :: (Extensibility -&gt; Extensibility -&gt; *)
                 -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n :: Extensibility -&gt; Extensibility -&gt; *)
       (block' :: (Extensibility -&gt; Extensibility -&gt; *)
                  -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n' :: Extensibility -&gt; Extensibility -&gt; *) (e :: Extensibility)
       (x :: Extensibility).
(forall (e :: Extensibility) (x :: Extensibility).
 block n e x -&gt; block' n' e x)
-&gt; Graph' block n e x -&gt; Graph' block' n' e x
</span><a href="GHC.Cmm.Dataflow.Graph.html#mapGraphBlocks"><span class="hs-identifier hs-var">mapGraphBlocks</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(forall (e :: Extensibility) (x :: Extensibility). n e x -&gt; n' e x)
-&gt; Block n e x -&gt; Block n' e x
forall (n :: Extensibility -&gt; Extensibility -&gt; *)
       (n' :: Extensibility -&gt; Extensibility -&gt; *) (e :: Extensibility)
       (x :: Extensibility).
(forall (e1 :: Extensibility) (x1 :: Extensibility).
 n e1 x1 -&gt; n' e1 x1)
-&gt; Block n e x -&gt; Block n' e x
</span><a href="GHC.Cmm.Dataflow.Block.html#mapBlock"><span class="hs-identifier hs-var">mapBlock</span></a></span><span> </span><span class="annot"><span class="annottext">forall (e :: Extensibility) (x :: Extensibility). n e x -&gt; n' e x
</span><a href="#local-6989586621680940993"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span class="hs-comment">-- | Function 'mapGraphBlocks' enables a change of representation of blocks,</span><span>
</span><span id="line-98"></span><span class="hs-comment">-- nodes, or both.  It lifts a polymorphic block transform into a polymorphic</span><span>
</span><span id="line-99"></span><span class="hs-comment">-- graph transform.  When the block representation stabilizes, a similar</span><span>
</span><span id="line-100"></span><span class="hs-comment">-- function should be provided for blocks.</span><span>
</span><span id="line-101"></span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#mapGraphBlocks"><span class="hs-identifier hs-type">mapGraphBlocks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680941120"><span class="annot"><a href="#local-6989586621680941120"><span class="hs-identifier hs-type">block</span></a></span></span><span> </span><span id="local-6989586621680941119"><span class="annot"><a href="#local-6989586621680941119"><span class="hs-identifier hs-type">n</span></a></span></span><span> </span><span id="local-6989586621680941118"><span class="annot"><a href="#local-6989586621680941118"><span class="hs-identifier hs-type">block'</span></a></span></span><span> </span><span id="local-6989586621680941117"><span class="annot"><a href="#local-6989586621680941117"><span class="hs-identifier hs-type">n'</span></a></span></span><span> </span><span id="local-6989586621680941116"><span class="annot"><a href="#local-6989586621680941116"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span id="local-6989586621680941115"><span class="annot"><a href="#local-6989586621680941115"><span class="hs-identifier hs-type">x</span></a></span></span><span> </span><span class="hs-operator">.</span><span>
</span><span id="line-102"></span><span>                  </span><span class="hs-special">(</span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680941125"><span class="annot"><a href="#local-6989586621680941125"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span id="local-6989586621680941124"><span class="annot"><a href="#local-6989586621680941124"><span class="hs-identifier hs-type">x</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="#local-6989586621680941120"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941119"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941125"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941124"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680941118"><span class="hs-identifier hs-type">block'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941117"><span class="hs-identifier hs-type">n'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941125"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941124"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941120"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941119"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941116"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941115"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941118"><span class="hs-identifier hs-type">block'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941117"><span class="hs-identifier hs-type">n'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941116"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941115"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span id="mapGraphBlocks"><span class="annot"><span class="annottext">mapGraphBlocks :: forall (block :: (Extensibility -&gt; Extensibility -&gt; *)
                 -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n :: Extensibility -&gt; Extensibility -&gt; *)
       (block' :: (Extensibility -&gt; Extensibility -&gt; *)
                  -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n' :: Extensibility -&gt; Extensibility -&gt; *) (e :: Extensibility)
       (x :: Extensibility).
(forall (e :: Extensibility) (x :: Extensibility).
 block n e x -&gt; block' n' e x)
-&gt; Graph' block n e x -&gt; Graph' block' n' e x
</span><a href="GHC.Cmm.Dataflow.Graph.html#mapGraphBlocks"><span class="hs-identifier hs-var hs-var">mapGraphBlocks</span></a></span></span><span> </span><span id="local-6989586621680940987"><span class="annot"><span class="annottext">forall (e :: Extensibility) (x :: Extensibility).
block n e x -&gt; block' n' e x
</span><a href="#local-6989586621680940987"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Graph' block n e x -&gt; Graph' block' n' e x
</span><a href="#local-6989586621680940986"><span class="hs-identifier hs-var">map</span></a></span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621680940986"><span class="hs-identifier hs-type">map</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941120"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941119"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941116"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941115"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941118"><span class="hs-identifier hs-type">block'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941117"><span class="hs-identifier hs-type">n'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941116"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941115"><span class="hs-identifier hs-type">x</span></a></span><span>
</span><span id="line-107"></span><span>        </span><span id="local-6989586621680940986"><span class="annot"><span class="annottext">map :: Graph' block n e x -&gt; Graph' block' n' e x
</span><a href="#local-6989586621680940986"><span class="hs-identifier hs-var hs-var">map</span></a></span></span><span> </span><span class="annot"><span class="annottext">Graph' block n e x
</span><a href="GHC.Cmm.Dataflow.Graph.html#GNil"><span class="hs-identifier hs-var">GNil</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Graph' block' n' e x
forall (block :: (Extensibility -&gt; Extensibility -&gt; *)
                 -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n :: Extensibility -&gt; Extensibility -&gt; *).
Graph' block n 'Open 'Open
</span><a href="GHC.Cmm.Dataflow.Graph.html#GNil"><span class="hs-identifier hs-var">GNil</span></a></span><span>
</span><span id="line-108"></span><span>        </span><span class="annot"><a href="#local-6989586621680940986"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#GUnit"><span class="hs-identifier hs-type">GUnit</span></a></span><span> </span><span id="local-6989586621680940981"><span class="annot"><span class="annottext">block n 'Open 'Open
</span><a href="#local-6989586621680940981"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">block' n' 'Open 'Open -&gt; Graph' block' n' 'Open 'Open
forall (block :: (Extensibility -&gt; Extensibility -&gt; *)
                 -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n :: Extensibility -&gt; Extensibility -&gt; *).
block n 'Open 'Open -&gt; Graph' block n 'Open 'Open
</span><a href="GHC.Cmm.Dataflow.Graph.html#GUnit"><span class="hs-identifier hs-var">GUnit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">block n 'Open 'Open -&gt; block' n' 'Open 'Open
forall (e :: Extensibility) (x :: Extensibility).
block n e x -&gt; block' n' e x
</span><a href="#local-6989586621680940987"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">block n 'Open 'Open
</span><a href="#local-6989586621680940981"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-109"></span><span>        </span><span class="annot"><a href="#local-6989586621680940986"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#GMany"><span class="hs-identifier hs-type">GMany</span></a></span><span> </span><span id="local-6989586621680940980"><span class="annot"><span class="annottext">MaybeO e (block n 'Open C)
</span><a href="#local-6989586621680940980"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621680940979"><span class="annot"><span class="annottext">Body' block n
</span><a href="#local-6989586621680940979"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621680940978"><span class="annot"><span class="annottext">MaybeO x (block n C 'Open)
</span><a href="#local-6989586621680940978"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MaybeO e (block' n' 'Open C)
-&gt; Body' block' n'
-&gt; MaybeO x (block' n' C 'Open)
-&gt; Graph' block' n' e x
forall (e :: Extensibility)
       (block :: (Extensibility -&gt; Extensibility -&gt; *)
                 -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n :: Extensibility -&gt; Extensibility -&gt; *) (x :: Extensibility).
MaybeO e (block n 'Open C)
-&gt; Body' block n
-&gt; MaybeO x (block n C 'Open)
-&gt; Graph' block n e x
</span><a href="GHC.Cmm.Dataflow.Graph.html#GMany"><span class="hs-identifier hs-var">GMany</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(block n 'Open C -&gt; block' n' 'Open C)
-&gt; MaybeO e (block n 'Open C) -&gt; MaybeO e (block' n' 'Open C)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">block n 'Open C -&gt; block' n' 'Open C
forall (e :: Extensibility) (x :: Extensibility).
block n e x -&gt; block' n' e x
</span><a href="#local-6989586621680940987"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">MaybeO e (block n 'Open C)
</span><a href="#local-6989586621680940980"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(block n C C -&gt; block' n' C C) -&gt; Body' block n -&gt; Body' block' n'
forall (map :: * -&gt; *) a b. IsMap map =&gt; (a -&gt; b) -&gt; map a -&gt; map b
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapMap"><span class="hs-identifier hs-var">mapMap</span></a></span><span> </span><span class="annot"><span class="annottext">block n C C -&gt; block' n' C C
forall (e :: Extensibility) (x :: Extensibility).
block n e x -&gt; block' n' e x
</span><a href="#local-6989586621680940987"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Body' block n
</span><a href="#local-6989586621680940979"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(block n C 'Open -&gt; block' n' C 'Open)
-&gt; MaybeO x (block n C 'Open) -&gt; MaybeO x (block' n' C 'Open)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">block n C 'Open -&gt; block' n' C 'Open
forall (e :: Extensibility) (x :: Extensibility).
block n e x -&gt; block' n' e x
</span><a href="#local-6989586621680940987"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">MaybeO x (block n C 'Open)
</span><a href="#local-6989586621680940978"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-112"></span><span class="hs-comment">-- Extracting Labels from graphs</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#labelsDefined"><span class="hs-identifier hs-type">labelsDefined</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680941085"><span class="annot"><a href="#local-6989586621680941085"><span class="hs-identifier hs-type">block</span></a></span></span><span> </span><span id="local-6989586621680941084"><span class="annot"><a href="#local-6989586621680941084"><span class="hs-identifier hs-type">n</span></a></span></span><span> </span><span id="local-6989586621680941083"><span class="annot"><a href="#local-6989586621680941083"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span id="local-6989586621680941082"><span class="annot"><a href="#local-6989586621680941082"><span class="hs-identifier hs-type">x</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#NonLocal"><span class="hs-identifier hs-type">NonLocal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941085"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941084"><span class="hs-identifier hs-type">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph%27"><span class="hs-identifier hs-type">Graph'</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941085"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941084"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941083"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941082"><span class="hs-identifier hs-type">x</span></a></span><span>
</span><span id="line-115"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span>
</span><span id="line-116"></span><span id="labelsDefined"><span class="annot"><span class="annottext">labelsDefined :: forall (block :: (Extensibility -&gt; Extensibility -&gt; *)
                 -&gt; Extensibility -&gt; Extensibility -&gt; *)
       (n :: Extensibility -&gt; Extensibility -&gt; *) (e :: Extensibility)
       (x :: Extensibility).
NonLocal (block n) =&gt;
Graph' block n e x -&gt; LabelSet
</span><a href="GHC.Cmm.Dataflow.Graph.html#labelsDefined"><span class="hs-identifier hs-var hs-var">labelsDefined</span></a></span></span><span> </span><span class="annot"><span class="annottext">Graph' block n e x
</span><a href="GHC.Cmm.Dataflow.Graph.html#GNil"><span class="hs-identifier hs-var">GNil</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelSet
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span>
</span><span id="line-117"></span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#labelsDefined"><span class="hs-identifier hs-var">labelsDefined</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#GUnit"><span class="hs-identifier hs-type">GUnit</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelSet
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span>
</span><span id="line-118"></span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#labelsDefined"><span class="hs-identifier hs-var">labelsDefined</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#GMany"><span class="hs-identifier hs-type">GMany</span></a></span><span> </span><span class="annot"><span class="annottext">MaybeO e (block n 'Open C)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680940966"><span class="annot"><span class="annottext">Body' block n
</span><a href="#local-6989586621680940966"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span id="local-6989586621680940965"><span class="annot"><span class="annottext">MaybeO x (block n C 'Open)
</span><a href="#local-6989586621680940965"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LabelSet -&gt; KeyOf LabelMap -&gt; block n C C -&gt; LabelSet)
-&gt; LabelSet -&gt; Body' block n -&gt; LabelSet
forall (map :: * -&gt; *) b a.
IsMap map =&gt;
(b -&gt; KeyOf map -&gt; a -&gt; b) -&gt; b -&gt; map a -&gt; b
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapFoldlWithKey"><span class="hs-identifier hs-var">mapFoldlWithKey</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet -&gt; KeyOf LabelMap -&gt; block n C C -&gt; LabelSet
forall a. LabelSet -&gt; ElemOf LabelSet -&gt; a -&gt; LabelSet
</span><a href="#local-6989586621680940963"><span class="hs-identifier hs-var">addEntry</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MaybeO x (block n C 'Open) -&gt; LabelSet
</span><a href="#local-6989586621680940962"><span class="hs-identifier hs-var">exitLabel</span></a></span><span> </span><span class="annot"><span class="annottext">MaybeO x (block n C 'Open)
</span><a href="#local-6989586621680940965"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Body' block n
</span><a href="#local-6989586621680940966"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621680940963"><span class="hs-identifier hs-type">addEntry</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680941071"><span class="annot"><a href="#local-6989586621680941071"><span class="hs-identifier hs-type">a</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html#ElemOf"><span class="hs-identifier hs-type">ElemOf</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680941071"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span>
</span><span id="line-120"></span><span>        </span><span id="local-6989586621680940963"><span class="annot"><span class="annottext">addEntry :: forall a. LabelSet -&gt; ElemOf LabelSet -&gt; a -&gt; LabelSet
</span><a href="#local-6989586621680940963"><span class="hs-identifier hs-var hs-var">addEntry</span></a></span></span><span> </span><span id="local-6989586621680940960"><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621680940960"><span class="hs-identifier hs-var">labels</span></a></span></span><span> </span><span id="local-6989586621680940959"><span class="annot"><span class="annottext">ElemOf LabelSet
</span><a href="#local-6989586621680940959"><span class="hs-keyword hs-var">label</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet -&gt; LabelSet
forall set. IsSet set =&gt; ElemOf set -&gt; set -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setInsert"><span class="hs-identifier hs-var">setInsert</span></a></span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet
</span><a href="#local-6989586621680940959"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621680940960"><span class="hs-identifier hs-var">labels</span></a></span><span>
</span><span id="line-121"></span><span>        </span><span class="annot"><a href="#local-6989586621680940962"><span class="hs-identifier hs-type">exitLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#MaybeO"><span class="hs-identifier hs-type">MaybeO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941082"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941085"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941084"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#O"><span class="hs-identifier hs-type">O</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span>
</span><span id="line-122"></span><span>        </span><span id="local-6989586621680940962"><span class="annot"><span class="annottext">exitLabel :: MaybeO x (block n C 'Open) -&gt; LabelSet
</span><a href="#local-6989586621680940962"><span class="hs-identifier hs-var hs-var">exitLabel</span></a></span></span><span> </span><span class="annot"><span class="annottext">MaybeO x (block n C 'Open)
</span><a href="GHC.Cmm.Dataflow.Block.html#NothingO"><span class="hs-identifier hs-var">NothingO</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelSet
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span>
</span><span id="line-123"></span><span>        </span><span class="annot"><a href="#local-6989586621680940962"><span class="hs-identifier hs-var">exitLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#JustO"><span class="hs-identifier hs-type">JustO</span></a></span><span> </span><span id="local-6989586621680940950"><span class="annot"><span class="annottext">block n C 'Open
</span><a href="#local-6989586621680940950"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet
forall set. IsSet set =&gt; ElemOf set -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setSingleton"><span class="hs-identifier hs-var">setSingleton</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">block n C 'Open -&gt; Label
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
NonLocal thing =&gt;
thing C x -&gt; Label
</span><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var">entryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">block n C 'Open
</span><a href="#local-6989586621680940950"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- | Returns a list of blocks reachable from the provided Labels in the reverse</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- postorder.</span><span>
</span><span id="line-130"></span><span class="hs-comment">--</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- This is the most important traversal over this data structure.  It drops</span><span>
</span><span id="line-132"></span><span class="hs-comment">-- unreachable code and puts blocks in an order that is good for solving forward</span><span>
</span><span id="line-133"></span><span class="hs-comment">-- dataflow problems quickly.  The reverse order is good for solving backward</span><span>
</span><span id="line-134"></span><span class="hs-comment">-- dataflow problems quickly.  The forward order is also reasonably good for</span><span>
</span><span id="line-135"></span><span class="hs-comment">-- emitting instructions, except that it will not usually exploit Forrest</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- Baskett's trick of eliminating the unconditional branch from a loop.  For</span><span>
</span><span id="line-137"></span><span class="hs-comment">-- that you would need a more serious analysis, probably based on dominators, to</span><span>
</span><span id="line-138"></span><span class="hs-comment">-- identify loop headers.</span><span>
</span><span id="line-139"></span><span class="hs-comment">--</span><span>
</span><span id="line-140"></span><span class="hs-comment">-- For forward analyses we want reverse postorder visitation, consider:</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-142"></span><span class="hs-comment">--      A -&gt; [B,C]</span><span>
</span><span id="line-143"></span><span class="hs-comment">--      B -&gt; D</span><span>
</span><span id="line-144"></span><span class="hs-comment">--      C -&gt; D</span><span>
</span><span id="line-145"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-146"></span><span class="hs-comment">-- Postorder: [D, C, B, A] (or [D, B, C, A])</span><span>
</span><span id="line-147"></span><span class="hs-comment">-- Reverse postorder: [A, B, C, D] (or [A, C, B, D])</span><span>
</span><span id="line-148"></span><span class="hs-comment">-- This matters for, e.g., forward analysis, because we want to analyze *both*</span><span>
</span><span id="line-149"></span><span class="hs-comment">-- B and C before we analyze D.</span><span>
</span><span id="line-150"></span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#revPostorderFrom"><span class="hs-identifier hs-type">revPostorderFrom</span></a></span><span>
</span><span id="line-151"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680941069"><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span></span><span class="hs-operator">.</span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#NonLocal"><span class="hs-identifier hs-type">NonLocal</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-153"></span><span id="revPostorderFrom"><span class="annot"><span class="annottext">revPostorderFrom :: forall (block :: Extensibility -&gt; Extensibility -&gt; *).
NonLocal block =&gt;
LabelMap (block C C) -&gt; Label -&gt; [block C C]
</span><a href="GHC.Cmm.Dataflow.Graph.html#revPostorderFrom"><span class="hs-identifier hs-var hs-var">revPostorderFrom</span></a></span></span><span> </span><span id="local-6989586621680940935"><span class="annot"><span class="annottext">LabelMap (block C C)
</span><a href="#local-6989586621680940935"><span class="hs-identifier hs-var">graph</span></a></span></span><span> </span><span id="local-6989586621680940934"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680940934"><span class="hs-identifier hs-var">start</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C) -&gt; LabelSet -&gt; [block C C] -&gt; [block C C]
</span><a href="#local-6989586621680940933"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940932"><span class="hs-identifier hs-var">start_worklist</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-154"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-155"></span><span>    </span><span id="local-6989586621680940932"><span class="annot"><span class="annottext">start_worklist :: DfsStack (block C C)
</span><a href="#local-6989586621680940932"><span class="hs-identifier hs-var hs-var">start_worklist</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Label -&gt; DfsStack (block C C) -&gt; DfsStack (block C C)
</span><a href="#local-6989586621680940931"><span class="hs-identifier hs-var">lookup_for_descend</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680940934"><span class="hs-identifier hs-var">start</span></a></span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C)
forall a. DfsStack a
</span><a href="GHC.Cmm.Dataflow.Graph.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span>    </span><span class="hs-comment">-- To compute the postorder we need to &quot;visit&quot; a block (mark as done)</span><span>
</span><span id="line-158"></span><span>    </span><span class="hs-comment">-- *after* visiting all its successors. So we need to know whether we</span><span>
</span><span id="line-159"></span><span>    </span><span class="hs-comment">-- already processed all successors of each block (and @NonLocal@ allows</span><span>
</span><span id="line-160"></span><span>    </span><span class="hs-comment">-- arbitrary many successors). So we use an explicit stack with an extra bit</span><span>
</span><span id="line-161"></span><span>    </span><span class="hs-comment">-- of information:</span><span>
</span><span id="line-162"></span><span>    </span><span class="hs-comment">-- * @ConsTodo@ means to explore the block if it wasn't visited before</span><span>
</span><span id="line-163"></span><span>    </span><span class="hs-comment">-- * @ConsMark@ means that all successors were already done and we can add</span><span>
</span><span id="line-164"></span><span>    </span><span class="hs-comment">--   the block to the result.</span><span>
</span><span id="line-165"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-166"></span><span>    </span><span class="hs-comment">-- NOTE: We add blocks to the result list in postorder, but we *prepend*</span><span>
</span><span id="line-167"></span><span>    </span><span class="hs-comment">-- them (i.e., we use @(:)@), which means that the final list is in reverse</span><span>
</span><span id="line-168"></span><span>    </span><span class="hs-comment">-- postorder.</span><span>
</span><span id="line-169"></span><span>    </span><span class="annot"><a href="#local-6989586621680940933"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#DfsStack"><span class="hs-identifier hs-type">DfsStack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-170"></span><span>    </span><span id="local-6989586621680940933"><span class="annot"><span class="annottext">go :: DfsStack (block C C) -&gt; LabelSet -&gt; [block C C] -&gt; [block C C]
</span><a href="#local-6989586621680940933"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="GHC.Cmm.Dataflow.Graph.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span><span>                      </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">LabelSet
</span><span class="hs-identifier">_</span></span><span>           </span><span class="hs-glyph">!</span><span id="local-6989586621680940929"><span class="annot"><span class="annottext">[block C C]
</span><a href="#local-6989586621680940929"><span class="hs-identifier hs-var">result</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[block C C]
</span><a href="#local-6989586621680940929"><span class="hs-identifier hs-var">result</span></a></span><span>
</span><span id="line-171"></span><span>    </span><span class="annot"><a href="#local-6989586621680940933"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#ConsMark"><span class="hs-identifier hs-type">ConsMark</span></a></span><span> </span><span id="local-6989586621680940927"><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940927"><span class="hs-identifier hs-var">block</span></a></span></span><span> </span><span id="local-6989586621680940926"><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940926"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">!</span><span id="local-6989586621680940925"><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621680940925"><span class="hs-identifier hs-var">wip_or_done</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680940924"><span class="annot"><span class="annottext">[block C C]
</span><a href="#local-6989586621680940924"><span class="hs-identifier hs-var">result</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-172"></span><span>        </span><span class="annot"><span class="annottext">DfsStack (block C C) -&gt; LabelSet -&gt; [block C C] -&gt; [block C C]
</span><a href="#local-6989586621680940933"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940926"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621680940925"><span class="hs-identifier hs-var">wip_or_done</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940927"><span class="hs-identifier hs-var">block</span></a></span><span> </span><span class="annot"><span class="annottext">block C C -&gt; [block C C] -&gt; [block C C]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[block C C]
</span><a href="#local-6989586621680940924"><span class="hs-identifier hs-var">result</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-173"></span><span>    </span><span class="annot"><a href="#local-6989586621680940933"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#ConsTodo"><span class="hs-identifier hs-type">ConsTodo</span></a></span><span> </span><span id="local-6989586621680940922"><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940922"><span class="hs-identifier hs-var">block</span></a></span></span><span> </span><span id="local-6989586621680940921"><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940921"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">!</span><span id="local-6989586621680940920"><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621680940920"><span class="hs-identifier hs-var">wip_or_done</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680940919"><span class="annot"><span class="annottext">[block C C]
</span><a href="#local-6989586621680940919"><span class="hs-identifier hs-var">result</span></a></span></span><span>
</span><span id="line-174"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">block C C -&gt; Label
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
NonLocal thing =&gt;
thing C x -&gt; Label
</span><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var">entryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940922"><span class="hs-identifier hs-var">block</span></a></span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet -&gt; Bool
forall set. IsSet set =&gt; ElemOf set -&gt; set -&gt; Bool
</span><a href="GHC.Cmm.Dataflow.Collections.html#setMember"><span class="hs-operator hs-var">`setMember`</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621680940920"><span class="hs-identifier hs-var">wip_or_done</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C) -&gt; LabelSet -&gt; [block C C] -&gt; [block C C]
</span><a href="#local-6989586621680940933"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940921"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621680940920"><span class="hs-identifier hs-var">wip_or_done</span></a></span><span> </span><span class="annot"><span class="annottext">[block C C]
</span><a href="#local-6989586621680940919"><span class="hs-identifier hs-var">result</span></a></span><span>
</span><span id="line-175"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-176"></span><span>            </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680940917"><span class="annot"><span class="annottext">new_worklist :: DfsStack (block C C)
</span><a href="#local-6989586621680940917"><span class="hs-identifier hs-var hs-var">new_worklist</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-177"></span><span>                    </span><span class="annot"><span class="annottext">(Label -&gt; DfsStack (block C C) -&gt; DfsStack (block C C))
-&gt; DfsStack (block C C) -&gt; [Label] -&gt; DfsStack (block C C)
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; DfsStack (block C C) -&gt; DfsStack (block C C)
</span><a href="#local-6989586621680940931"><span class="hs-identifier hs-var">lookup_for_descend</span></a></span><span>
</span><span id="line-178"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">block C C -&gt; DfsStack (block C C) -&gt; DfsStack (block C C)
forall a. a -&gt; DfsStack a -&gt; DfsStack a
</span><a href="GHC.Cmm.Dataflow.Graph.html#ConsMark"><span class="hs-identifier hs-var">ConsMark</span></a></span><span> </span><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940922"><span class="hs-identifier hs-var">block</span></a></span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940921"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">block C C -&gt; [Label]
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (e :: Extensibility).
NonLocal thing =&gt;
thing e C -&gt; [Label]
</span><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940922"><span class="hs-identifier hs-var">block</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-180"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C) -&gt; LabelSet -&gt; [block C C] -&gt; [block C C]
</span><a href="#local-6989586621680940933"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940917"><span class="hs-identifier hs-var">new_worklist</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet -&gt; LabelSet
forall set. IsSet set =&gt; ElemOf set -&gt; set -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setInsert"><span class="hs-identifier hs-var">setInsert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">block C C -&gt; Label
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
NonLocal thing =&gt;
thing C x -&gt; Label
</span><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var">entryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940922"><span class="hs-identifier hs-var">block</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621680940920"><span class="hs-identifier hs-var">wip_or_done</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[block C C]
</span><a href="#local-6989586621680940919"><span class="hs-identifier hs-var">result</span></a></span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span>    </span><span class="annot"><a href="#local-6989586621680940931"><span class="hs-identifier hs-type">lookup_for_descend</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#DfsStack"><span class="hs-identifier hs-type">DfsStack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#DfsStack"><span class="hs-identifier hs-type">DfsStack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680941069"><span class="hs-identifier hs-type">block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>    </span><span id="local-6989586621680940931"><span class="annot"><span class="annottext">lookup_for_descend :: Label -&gt; DfsStack (block C C) -&gt; DfsStack (block C C)
</span><a href="#local-6989586621680940931"><span class="hs-identifier hs-var hs-var">lookup_for_descend</span></a></span></span><span> </span><span id="local-6989586621680940915"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680940915"><span class="hs-keyword hs-var">label</span></a></span></span><span> </span><span id="local-6989586621680940914"><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940914"><span class="hs-identifier hs-var">wl</span></a></span></span><span>
</span><span id="line-184"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680940913"><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940913"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap (block C C) -&gt; Maybe (block C C)
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
Label
</span><a href="#local-6989586621680940915"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap (block C C)
</span><a href="#local-6989586621680940935"><span class="hs-identifier hs-var">graph</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">block C C -&gt; DfsStack (block C C) -&gt; DfsStack (block C C)
forall a. a -&gt; DfsStack a -&gt; DfsStack a
</span><a href="GHC.Cmm.Dataflow.Graph.html#ConsTodo"><span class="hs-identifier hs-var">ConsTodo</span></a></span><span> </span><span class="annot"><span class="annottext">block C C
</span><a href="#local-6989586621680940913"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">DfsStack (block C C)
</span><a href="#local-6989586621680940914"><span class="hs-identifier hs-var">wl</span></a></span><span>
</span><span id="line-185"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-186"></span><span>           </span><span class="annot"><span class="annottext">[Char] -&gt; DfsStack (block C C)
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">([Char] -&gt; DfsStack (block C C)) -&gt; [Char] -&gt; DfsStack (block C C)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;Label that doesn't have a block?! &quot;</span></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; [Char] -&gt; [Char]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621680940915"><span class="hs-keyword hs-var">label</span></a></span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="hs-keyword">data</span><span> </span><span id="DfsStack"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#DfsStack"><span class="hs-identifier hs-var">DfsStack</span></a></span></span><span> </span><span id="local-6989586621680941066"><span class="annot"><a href="#local-6989586621680941066"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ConsTodo"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#ConsTodo"><span class="hs-identifier hs-var">ConsTodo</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621680941066"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#DfsStack"><span class="hs-identifier hs-type">DfsStack</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941066"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="ConsMark"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#ConsMark"><span class="hs-identifier hs-var">ConsMark</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621680941066"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#DfsStack"><span class="hs-identifier hs-type">DfsStack</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941066"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="Nil"><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Nil"><span class="hs-identifier hs-var">Nil</span></a></span></span><span>
</span><span id="line-189"></span></pre></body></html>